void prfx_frs_func_clear ( void ) ;A skeleton for this function is shown in Example 7-10. The Frame Scheduler that initialized a device driver calls this function when the Frame Scheduler is terminating. The Frame Scheduler deallocates the interrupt group to which interrupts were directed.
The device driver should clean up data structures and make sure that the device is in a safe state. A VME device driver must call vme_frs_uninstall().
Example 7-10 : Device Driver Termination Function
/* ** Frame Scheduler termination function */ void example_frs_func_clear(void) { /* ** Step 1: any hardware steps to quiesce the device. */ /* ** Step 2 (VME only): ** Break the link between interrupts and the interrupt ** group by calling vme_frs_uninstall() passing: ** * (int) the VME adapter number ** * (int) the VME IPL level ** * the value returned by vme_frs_install() */ vme_frs_uninstall( my_edt.e_adap, /* edt struct from example_edtinit */ ((vme_intrs_t *)my_edt.e_bus_info)->v_brl, FRS_vme_install); /* ** Step 3: note we are no longer in use. */ FRS_is_active = 0; }